From: Chad Horohoe Date: Tue, 11 Aug 2009 21:47:55 +0000 (+0000) Subject: Revert r35877, early commit that can only be explained by a complete naivete. Nobody... X-Git-Tag: 1.31.0-rc.0~40348 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=60c805b761402f8ca8ad1e1c46bc4a5f0b04afdf;p=lhc%2Fweb%2Fwiklou.git Revert r35877, early commit that can only be explained by a complete naivete. Nobody ever used this because they weren't idiots. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 440bd410a8..7da728af4c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1539,14 +1539,6 @@ $wgAvailableRights = array(); */ $wgDeleteRevisionsLimit = 0; -/** - * Used to figure out if a user is "active" or not. User::isActiveEditor() - * sees if a user has made at least $wgActiveUserEditCount number of edits - * within the last $wgActiveUserDays days. - */ -$wgActiveUserEditCount = 30; -$wgActiveUserDays = 30; - # Proxy scanner settings # diff --git a/includes/User.php b/includes/User.php index a1ef09ccbf..315efed5e3 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2688,32 +2688,6 @@ class User { return !$this->isAllowed( 'autoconfirmed' ); } - /** - * Is the user active? We check to see if they've made at least - * X number of edits in the last Y days. - * - * @return \bool True if the user is active, false if not. - */ - public function isActiveEditor() { - global $wgActiveUserEditCount, $wgActiveUserDays; - $dbr = wfGetDB( DB_SLAVE ); - - // Stolen without shame from RC - $cutoff_unixtime = time() - ( $wgActiveUserDays * 86400 ); - $cutoff_unixtime = $cutoff_unixtime - ( $cutoff_unixtime % 86400 ); - $oldTime = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) ); - - $res = $dbr->select( 'revision', '1', - array( 'rev_user_text' => $this->getName(), "rev_timestamp > $oldTime"), - __METHOD__, - array('LIMIT' => $wgActiveUserEditCount ) ); - - $count = $dbr->numRows($res); - $dbr->freeResult($res); - - return $count == $wgActiveUserEditCount; - } - /** * Check to see if the given clear-text password is one of the accepted passwords * @param $password \string user password.